package com.dog.basics.common.fluorite.configuration;

import com.dog.basics.common.fluorite.service.FluoriteUtil;
import com.dog.basics.common.properties.FluoriteProperties;
import lombok.AllArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description: 萤石配置信息
 * @author: He
 * @date: Created in 2020/7/4 16:22
 * @version: 1.0
 * @modified By:
 */
@AllArgsConstructor
@Configuration
@ConditionalOnClass(FluoriteUtil.class)
@EnableConfigurationProperties({FluoriteProperties.class})
public class FluoriteConfiguration {

    private final FluoriteProperties fluoriteProperties;

    /**
     *  植入萤石业务信息
     * @return
     */
    @Bean
    FluoriteUtil fluoriteProperties() {
        return new FluoriteUtil(fluoriteProperties);
    }

}